package com.dimples.dd.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dimples.dd.mybatis.core.dataobject.BaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@Schema
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "oauth2_registered_client")
public class Oauth2RegisteredClientDO extends BaseDO {
    @TableId(value = "id", type = IdType.INPUT)
    @Schema()
    private String id;

    @TableField(value = "client_id")
    @Schema(description="客户端编号")
    private String clientId;

    @TableField(value = "client_id_issued_at")
    @Schema(description="客户端发布时间")
    private Date clientIdIssuedAt;

    @TableField(value = "client_secret")
    @Schema(description="客户端密钥")
    private String clientSecret;

    @TableField(value = "client_secret_expires_at")
    @Schema(description="密钥有效期")
    private Date clientSecretExpiresAt;

    @TableField(value = "client_name")
    @Schema(description="应用名")
    private String clientName;

    @TableField(value = "client_authentication_methods")
    @Schema(description="客户端身份验证方法")
    private String clientAuthenticationMethods;

    @TableField(value = "authorization_grant_types")
    @Schema(description="授权类型")
    private String authorizationGrantTypes;

    @TableField(value = "redirect_uris")
    @Schema(description="重定向地址")
    private String redirectUris;

    @TableField(value = "post_logout_redirect_uris")
    @Schema(description="登出重定向地址")
    private String postLogoutRedirectUris;

    @TableField(value = "scopes")
    @Schema(description="授权范围")
    private String scopes;

    @TableField(value = "client_settings")
    @Schema(description="客户端配置")
    private String clientSettings;

    @TableField(value = "token_settings")
    @Schema(description="token配置")
    private String tokenSettings;

    /**
     * 应用图标
     */
    @TableField(value = "client_logo")
    @Schema(description="应用图标")
    private String clientLogo;

    /**
     * 应用描述
     */
    @TableField(value = "client_description")
    @Schema(description="应用描述")
    private String clientDescription;

    /**
     * 状态
     */
    @TableField(value = "`status`")
    @Schema(description="状态")
    private Byte status;
}